const KoaRouter = require('koa-router');
const router = new KoaRouter();

router.post('/api/upload', require('./controller/upload/index')); // 上传文件接口
router.post('/api/signup', require('./controller/user/signup')); // 注册接口
router.post('/api/signin', require('./controller/user/signin')); // 登陆接口
//商品
router.post('/api/product/create', require('./controller/product/create')); // 增加商品接口
router.post('/api/product/delete', require('./controller/product/deleteproduct')); // 删除商品接口
router.get('/api/product/list', require('./controller/product/list')); // 商品列表接口
router.post('/api/product/update', require('./controller/product/update')); // 更新商品接口


// 分类
router.post('/api/category/create', require('./controller/category/create')); // 添加分类
router.post('/api/category/update', require('./controller/category/update')); // 修改分类
router.post('/api/category/delete', require('./controller/category/delete')); // 删除分类
router.post('/api/category/list', require('./controller/category/list')); // 获取分类


router.post('/api/createfreight', require("./controller/freight/create"));//创建运费
router.post('/api/deletefreight', require("./controller/freight/delete"));//删除运费
router.get('/api/freightlist', require("./controller/freight/list"));//运费列表
router.post('/api/updatefreight', require("./controller/freight/update"));//更新运费


router.post('/api/banner/create', require('./controller/banner/create')); // 增加轮播图接口
router.post('/api/banner/delete', require('./controller/banner/delete')); // 删除轮播图接口
router.post('/api/banner/update', require('./controller/banner/update')); // 修改轮播图接口
router.get('/api/banner/list', require('./controller/banner/list')); // 获取轮播图接口
module.exports = router;
